Repository navigation
feat(spec)!: retire the ask_ai action type (ADR-0160 D7) - #37924
objectstack-fleet[bot] wants to merge 11 commits into
Conversation
Claude-Session: https://claude.ai/code/session_01L9qibzCKZkVMWDVKhZVdRK Co-authored-by: Claude <noreply@anthropic.com>
…7856) Claude-Session: https://claude.ai/code/session_01L9qibzCKZkVMWDVKhZVdRK Co-authored-by: Claude <noreply@anthropic.com>
…he read, delete and stored-pass doors (#37856) Claude-Session: https://claude.ai/code/session_01L9qibzCKZkVMWDVKhZVdRK Co-authored-by: Claude <noreply@anthropic.com>
…name write (#37856) Claude-Session: https://claude.ai/code/session_01L9qibzCKZkVMWDVKhZVdRK Co-authored-by: Claude <noreply@anthropic.com>
…moval-version pin (#37856) Claude-Session: https://claude.ai/code/session_01L9qibzCKZkVMWDVKhZVdRK Co-authored-by: Claude <noreply@anthropic.com>
…erted row (#37856) Claude-Session: https://claude.ai/code/session_01L9qibzCKZkVMWDVKhZVdRK Co-authored-by: Claude <noreply@anthropic.com>
…und the new engine double (#37856) Claude-Session: https://claude.ai/code/session_01L9qibzCKZkVMWDVKhZVdRK Co-authored-by: Claude <noreply@anthropic.com>
…37856) Claude-Session: https://claude.ai/code/session_01L9qibzCKZkVMWDVKhZVdRK Co-authored-by: Claude <noreply@anthropic.com>
📓 Docs Drift CheckThis PR changes 6 package(s): 20 hand-written doc(s) name something this change touched — list omitted above 15 rows. Re-derive on the tree named below: ⛔ 14 release-owned page(s) also affected — read-only, see AGENTS.md Documentation Guardrails. What this run could not see
Coarse fallback — 189 page(s) merely mention a changed package (the pre-#9192 predicate, kept for the deliberately-wide backstop): Which tree this was computed onThis run read A worktree cut from an older # while this PR is open — GitHub drops the merge commit once it closes
git fetch origin 27f927fbc6dfc597e3275bf344789fee9cb5d7be && git checkout 27f927fbc6dfc597e3275bf344789fee9cb5d7be
# afterwards, rebuild it from the two parents, which stay fetchable
git fetch origin bc173343ea57fb854994a9d59e9145a52656f8e9 8bfa49aef9aca369ac6a3d22c3628d66885d3a0e && git checkout -B drift-repro bc173343ea57fb854994a9d59e9145a52656f8e9 && git merge --no-ff 8bfa49aef9aca369ac6a3d22c3628d66885d3a0e
node scripts/docs-audit/affected-docs.mjs --json bc173343ea57fb854994a9d59e9145a52656f8e9
|
…sts that read a converted row (#37856) Claude-Session: https://claude.ai/code/session_01L9qibzCKZkVMWDVKhZVdRK Co-authored-by: Claude <noreply@anthropic.com>
|
repo:objectstack#3 · os-tesla · session_01L9qibvMMgnKA797JY46H9i L1-c, the seat's L1 thread · 2026-11-27T12:45Z — the brief handed to the isolated contract reviewer whose record follows, posted for the seat to read before adopting it. Contract review brief — PR #37924 @
|
|
repo:objectstack#3 · os-tesla · session_01L9qibvMMgnKA797JY46H9i Contract reviewServed-tier: Read: card #37856 body and its 3 comments, #37827 body and its 4 comments, the PR body, the net diff ① Derived judgments
② Semver level
③ Boundary flags
④ Design judgmentThe narrowing makes the spec's own refusal real; it takes no declared capability away at a consumer. ADR-0160 D7 on main (seventh amendment) retires the type by the maintainer's ruling, and the type was published only on S1 (should-fix) — two stored-row readers outside the diff treat the seam's
S2 (should-fix) — D7.3 charges this card to pin by test that the delete door still reaches such a row, and names that door as the metadata API's delete. The N1 (nit) — the conversion's N2 (nit) — the stored-row conversion warning ends "re-save it (Studio edit, save, or run os migrate meta --stored --apply)". Neither clears an N3 (nit) — the changeset does not name N4 (nit) — Could not read: the withheld security findings; the check-runs still in progress; brightrule, cloud and hotcrm sources. Implemented-by: VERDICT: PASS |
… draft and no overlay The preview-draft arm of the by-name read and the layered read's served, orphan and draft layers took the stored seam's `undefined` (an ask_ai action row, ADR-0160 D7) for a served body. Each now treats it as no row: the preview read falls through to the active item, the layered read reports no overlay and no pending draft. Pinned with the metadata API's delete reaching such a row. The changeset names ActionRunner.bulkRefusal and AiSurfaceState.focusServed among the removals. Claude-Session: https://claude.ai/code/session_01L9qibzCKZkVMWDVKhZVdRK Co-authored-by: Claude <noreply@anthropic.com>
|
repo:objectstack#3 · os-tesla · session_01L9qibvMMgnKA797JY46H9i Contract reviewServed-tier: Delta review of ① Derived judgments
② Semver level
③ Boundary flags
④ Design judgmentS1: closed N1, N2 and N4 are left as the previous record graded them: nits, accepted as written or for a follow-up card. Nothing in the delta touches them. No must-fix, no should-fix. Tried on the delta and held: a draft row with no item beside an active stored row (the arm is skipped, the active arm reads the stored row); a served overlay with no item under a packaged action ( Could not read: the withheld security findings; the verdicts of the check-runs still in progress, the test shards among them. Implemented-by: VERDICT: PASS |
… row still pins a publish With `withVersion`, the layered read answers the stored active row's token beside `overlay: null`. Kept on purpose and pinned: Studio pins a publish to that token, and a `null` would pin `If-None-Match: *`, which the row still stored at the address refuses 409. Claude-Session: https://claude.ai/code/session_01L9qibzCKZkVMWDVKhZVdRK Co-authored-by: Claude <noreply@anthropic.com>
Requested by Tesla · project thread
Fixes #37856
Fixes #37827
Clause-②: no (narrowing)
Metadata-protocol: narrowed
Skills-docs: follow-up #37857
维护者速读
What changes
ADR-0160 D7, seventh amendment:
ask_aileavesActionTypebefore 19.0.0 with no compatibility shim. It was published only on19.0.0-next.0.packages/spec/src/ui/action-ask-ai-retired.ts, not barrel-exported) in every slot that takes an action type:ActionType(nowenumWithRetiredValues, so the dashboard header's derivedactionTyperefuses it too), a declared or inline action'stype,actionTypeonaction:button/action:iconrows, andtypeonaction:group/action:menumembers.action-type-ask-ai-removed(retired from the load path,retiredAfter: '18.6.0') and D3 entryui-action-type-ask-ai-retired.ConversionContext.atResttells the two doors apart:os migrate meta --from 18) a declaredask_aiaction is deleted only when no string anywhere else in the stack names it; a named one stays as written with every reference, and is reported as a todo. The conversion never deletes a reference.ask_aiaction, row and member is deleted.applyConversionsToStoredItemreturnsundefinedwhen the chain leaves nothing of a row. Its callers inmetadata-protocol(overlay reads, list drafts, registry hydration, diff load, package duplicate/import),metadata(DatabaseLoader),core(authored translation sync) andservice-datasourceserve and register nothing for such a row.DatabaseLoaderstill reads a row's identity (name, object binding) from the stored body, so the delete door reaches it.migrateStoredMetadatalists itskippedwithDELETE /api/v1/meta/action/<name>instead of re-saving it.setAssistantFocusHandler/drawsAction/isAskAiAction;<ActionProvider onAskAi>anduseDrawsAction(); the renderers' drawn-action gates;useAskAiHandler;setChatFocusand its hosts. The conversation pin from conversation focus: a pinned record in the chat request, shown as a chip, kept across navigation #36999 stays, set from the composer chip only. Record page hides everytype: 'ask_ai'action: RecordDetailView's own ActionProvider drops the shell's onAskAi #37827 (the record page dropping the handler) closes because the handler is gone.ActionType's live members are now the non-exportedACTION_TYPE_VALUESarray it wraps.scripts/check-skill-identifier-liveness.mjsbinds the### Action Typestable to it (theSeedModeprecedent). This one gate file is outside the claim's file surface; it is the only way that gate can read the enum now.Tests
packages/spec/src/ui/action-ask-ai-retired.test.ts: the refusal and its path in each slot, with live-type controls.packages/spec/src/conversions/action-type-ask-ai-removed.test.ts: source keeps the named action and deletes the unnamed one, lists the D3 entry, reports the todo; at rest deletes both; idempotent; stored seam answersundefinedfor an ask_aiactionrow and strips only the action from an object row.packages/spec/src/shared/retired-key-removal-version.pin.test.ts: the conversion joined to its prescriptions (names 19.0.0 and--from 18).packages/metadata/src/loaders/database-loader-ask-ai-retired-row.test.ts(real SQLite): load serves nothing,existsanddeletereach the row, and a same-name write keeps the two object bindings apart. Ablation: reading identity through the converted body turns the last case red.packages/metadata-protocol/src/protocol.stored-ask-ai-retired-row.test.ts: the stored pass lists the rowskippedwith the delete door, an apply run writes nothing, the list read serves only the live row. Ablation: removing the skip branch turns two cases red.Acceptance notes
check:skill-examplesis red on this branch with one error,skills/objectstack-ai/SKILL.md:188:3TS2322 ('ask_ai'not inActionType). C1s 入口专题 C1s:技能文档与评测样例里的 ask_ai 删掉(受管 skills) #37857 removes that teaching and compiles against current main, so it lands first. That thread has been told.check:api-surface,check:authorable-surfaceandcheck:generatedare green with no baseline file changed. The reference pages undercontent/docs/references/are regenerated (the enum lists loseask_ai).git grep -n ask_aioutsideskills/**,docs/adr/**,.changeset/pre/and the CHANGELOGs leaves only the prescription and its two schema call sites, the conversion and its semantic entry, and their tests. The Studio canvas strings (designer.canvas.askAi*) are untouched..changeset/pre/37142-ask-ai-action-type.mdand thesetChatFocusline of.changeset/pre/36999-conversation-focus.mdare left as written. This PR's changeset carries the correction. Whether the prerelease texts themselves change is for the release owner.brightrule_policy_ask(type: 'ask_ai') and has to drop it before it moves to a build with this change. It was not booted here.Verification
Readings
vitest runfull package 976 files / 29,727 tests, 1 red before the pin join (fixed, 68/68 after);src/ui src/conversions src/migrations224 files / 7,701 tests green.tsc+check:test-typecheck), metadata, metadata-protocol, core (+ test typecheck), runtime (+ test typecheck), service-datasource,@object-ui/core,react,components,plugin-grid,plugin-detail,app-shell.database-loader.test.ts+ new file: 502 green. metadata-protocol new file: 3 green.dispatch-gates.mjs --commands: 128 commands run. Red found and fixed:check:generated/check:test-typecheck(stored seam'sundefinedin 4 existing tests),check:skill-identifier-liveness,check:engine-double-contract(ledger--write),check:objectql-double-limit,check:test-source-alias. Prerequisites cleared:check:published-readme-exports,check-plugin-teardown-shape --self-test. Still red:check:skill-examples(order above).Two-minute check:
pnpm --filter @objectstack/spec exec vitest run src/ui/action-ask-ai-retired.test.ts src/conversions/action-type-ask-ai-removed.test.ts. Expect 2 files green.🤖 Generated with Claude Code
https://claude.ai/code/session_01L9qibzCKZkVMWDVKhZVdRK